package org.shaka.db.sqlbuilder.tables;

import java.util.Arrays;
import java.util.List;

import org.shaka.db.sqlbuilder.component.Column;
import org.shaka.db.sqlbuilder.component.Table;

public class User extends Table {
    public static final Column id = new Column("id");
    public static final Column userId = new Column("user_id");
    public static final Column name = new Column("name");

    public static final User table = new User();

    private User() {
        super(null, "user");
        addJoinLinkInfo(UserUnitRole.table, PairColumns.valueOf(id, UserUnitRole.userId));
    }

    @Override
    public List<Column> primaryKeys() {
        return Arrays.asList(id);
    }

    @Override
    public List<Column> columns() {
        return Arrays.asList(id, userId, name);
    }
}
